package YAVMM::GuestDB::Plugin::MongoDB;
use warnings;
use strict;

use YAVMM::Guest;
use YAVMM::Error::DBError;

use MongoDB;

has '_db' => (
    is         => 'rw',
    lazy_build => 1,
);


sub _build__db {
    my $self = shift;

    my $db = MongoDB::Connection->new( # connect to localhost:27017
	'db_name'   => 'yavmm',
	'username'  => $self->settings->get('guest mongodb', 'username'),
	'password'  => $self->settings->get('guest mongodb', 'password'),
    );
}
